import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ProductLayoutComponent } from './_layout/layout.component';
import { ProductViewComponent } from './product-view/product-view.component';
import { ProductListComponent } from './product-list/product-list.component';
import { ProductImageComponent } from './product-image/product-image.component';
import { ProductYearComponent } from './prodyear/product-year.component';

const routes: Routes = [
  {
    path: 'list',
    component: ProductListComponent,
  },
  {
    path: 'images',
    component: ProductImageComponent,
  },
  {
    path: '',
    component: ProductLayoutComponent,
    children: [{ path: 'prodyear', component: ProductYearComponent }],
  },
  {
    path: 'list/view/:productCd',
    component: ProductViewComponent,
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class ProductRoutingModule {}
